from tkinter import *

room = Tk()
room.title("ИТ марафон")
room.geometry("500x500")

x0 = float(input("Координата x: "))
y0 = float(input("Координата y: "))

coof = int(input("Коэффициент: "))
x1 = (coof * 10) + x0
y1 = (coof * 30) + y0

x20 = x0
y20 = y0 + (coof * 10)
x21 = (coof * 20) + x20
y21 = (coof * 10) + y20

if x0 < 0 or y0 < 0 or x1>500 or y1>500 or x21>500 or y21>500:
   print("Размер фигуры превышает максимальный размер")
   
canvas = Canvas(bg="white", width=500, height=500)
canvas.pack(anchor=CENTER, expand=1)
canvas.create_rectangle(x0, y0, x1, y1, fill="#000000")
canvas.create_rectangle(x20, y20, x21, y21, fill="#000000")
room.mainloop()
